"
Pool of various SDL2 library constants
"
Class {
	#name : 'SDL2Constants',
	#superclass : 'SharedPool',
	#classVars : [
		'AUDIO_F32',
		'AUDIO_F32LSB',
		'AUDIO_F32MSB',
		'AUDIO_S16',
		'AUDIO_S16LSB',
		'AUDIO_S16MSB',
		'AUDIO_S32',
		'AUDIO_S32LSB',
		'AUDIO_S32MSB',
		'AUDIO_S8',
		'AUDIO_U16',
		'AUDIO_U16LSB',
		'AUDIO_U16MSB',
		'AUDIO_U8',
		'KMOD_ALT',
		'KMOD_CAPS',
		'KMOD_CTRL',
		'KMOD_GUI',
		'KMOD_LALT',
		'KMOD_LCTRL',
		'KMOD_LGUI',
		'KMOD_LSHIFT',
		'KMOD_MODE',
		'KMOD_NONE',
		'KMOD_NUM',
		'KMOD_RALT',
		'KMOD_RCTRL',
		'KMOD_RESERVED',
		'KMOD_RGUI',
		'KMOD_RSHIFT',
		'KMOD_SHIFT',
		'SDLK_0',
		'SDLK_1',
		'SDLK_2',
		'SDLK_3',
		'SDLK_4',
		'SDLK_5',
		'SDLK_6',
		'SDLK_7',
		'SDLK_8',
		'SDLK_9',
		'SDLK_AC_BACK',
		'SDLK_AC_BOOKMARKS',
		'SDLK_AC_FORWARD',
		'SDLK_AC_HOME',
		'SDLK_AC_REFRESH',
		'SDLK_AC_SEARCH',
		'SDLK_AC_STOP',
		'SDLK_AGAIN',
		'SDLK_ALTERASE',
		'SDLK_AMPERSAND',
		'SDLK_APPLICATION',
		'SDLK_ASTERISK',
		'SDLK_AT',
		'SDLK_AUDIOMUTE',
		'SDLK_AUDIONEXT',
		'SDLK_AUDIOPLAY',
		'SDLK_AUDIOPREV',
		'SDLK_AUDIOSTOP',
		'SDLK_BACKQUOTE',
		'SDLK_BACKSLASH',
		'SDLK_BACKSPACE',
		'SDLK_BRIGHTNESSDOWN',
		'SDLK_BRIGHTNESSUP',
		'SDLK_CALCULATOR',
		'SDLK_CANCEL',
		'SDLK_CAPSLOCK',
		'SDLK_CARET',
		'SDLK_CLEAR',
		'SDLK_CLEARAGAIN',
		'SDLK_COLON',
		'SDLK_COMMA',
		'SDLK_COMPUTER',
		'SDLK_COPY',
		'SDLK_CRSEL',
		'SDLK_CURRENCYSUBUNIT',
		'SDLK_CURRENCYUNIT',
		'SDLK_CUT',
		'SDLK_DECIMALSEPARATOR',
		'SDLK_DELETE',
		'SDLK_DISPLAYSWITCH',
		'SDLK_DOLLAR',
		'SDLK_DOWN',
		'SDLK_EJECT',
		'SDLK_END',
		'SDLK_EQUALS',
		'SDLK_ESCAPE',
		'SDLK_EXCLAIM',
		'SDLK_EXECUTE',
		'SDLK_EXSEL',
		'SDLK_F1',
		'SDLK_F10',
		'SDLK_F11',
		'SDLK_F12',
		'SDLK_F13',
		'SDLK_F14',
		'SDLK_F15',
		'SDLK_F16',
		'SDLK_F17',
		'SDLK_F18',
		'SDLK_F19',
		'SDLK_F2',
		'SDLK_F20',
		'SDLK_F21',
		'SDLK_F22',
		'SDLK_F23',
		'SDLK_F24',
		'SDLK_F3',
		'SDLK_F4',
		'SDLK_F5',
		'SDLK_F6',
		'SDLK_F7',
		'SDLK_F8',
		'SDLK_F9',
		'SDLK_FIND',
		'SDLK_GREATER',
		'SDLK_HASH',
		'SDLK_HELP',
		'SDLK_HOME',
		'SDLK_INSERT',
		'SDLK_KBDILLUMDOWN',
		'SDLK_KBDILLUMTOGGLE',
		'SDLK_KBDILLUMUP',
		'SDLK_KP_0',
		'SDLK_KP_00',
		'SDLK_KP_000',
		'SDLK_KP_1',
		'SDLK_KP_2',
		'SDLK_KP_3',
		'SDLK_KP_4',
		'SDLK_KP_5',
		'SDLK_KP_6',
		'SDLK_KP_7',
		'SDLK_KP_8',
		'SDLK_KP_9',
		'SDLK_KP_A',
		'SDLK_KP_AMPERSAND',
		'SDLK_KP_AT',
		'SDLK_KP_B',
		'SDLK_KP_BACKSPACE',
		'SDLK_KP_BINARY',
		'SDLK_KP_C',
		'SDLK_KP_CLEAR',
		'SDLK_KP_CLEARENTRY',
		'SDLK_KP_COLON',
		'SDLK_KP_COMMA',
		'SDLK_KP_D',
		'SDLK_KP_DBLAMPERSAND',
		'SDLK_KP_DBLVERTICALBAR',
		'SDLK_KP_DECIMAL',
		'SDLK_KP_DIVIDE',
		'SDLK_KP_E',
		'SDLK_KP_ENTER',
		'SDLK_KP_EQUALS',
		'SDLK_KP_EQUALSAS400',
		'SDLK_KP_EXCLAM',
		'SDLK_KP_F',
		'SDLK_KP_GREATER',
		'SDLK_KP_HASH',
		'SDLK_KP_HEXADECIMAL',
		'SDLK_KP_LEFTBRACE',
		'SDLK_KP_LEFTPAREN',
		'SDLK_KP_LESS',
		'SDLK_KP_MEMADD',
		'SDLK_KP_MEMCLEAR',
		'SDLK_KP_MEMDIVIDE',
		'SDLK_KP_MEMMULTIPLY',
		'SDLK_KP_MEMRECALL',
		'SDLK_KP_MEMSTORE',
		'SDLK_KP_MEMSUBTRACT',
		'SDLK_KP_MINUS',
		'SDLK_KP_MULTIPLY',
		'SDLK_KP_OCTAL',
		'SDLK_KP_PERCENT',
		'SDLK_KP_PERIOD',
		'SDLK_KP_PLUS',
		'SDLK_KP_PLUSMINUS',
		'SDLK_KP_POWER',
		'SDLK_KP_RIGHTBRACE',
		'SDLK_KP_RIGHTPAREN',
		'SDLK_KP_SPACE',
		'SDLK_KP_TAB',
		'SDLK_KP_VERTICALBAR',
		'SDLK_KP_XOR',
		'SDLK_LALT',
		'SDLK_LCTRL',
		'SDLK_LEFT',
		'SDLK_LEFTBRACKET',
		'SDLK_LEFTPAREN',
		'SDLK_LESS',
		'SDLK_LGUI',
		'SDLK_LSHIFT',
		'SDLK_MAIL',
		'SDLK_MEDIASELECT',
		'SDLK_MENU',
		'SDLK_MINUS',
		'SDLK_MODE',
		'SDLK_MUTE',
		'SDLK_NUMLOCKCLEAR',
		'SDLK_OPER',
		'SDLK_OUT',
		'SDLK_PAGEDOWN',
		'SDLK_PAGEUP',
		'SDLK_PASTE',
		'SDLK_PAUSE',
		'SDLK_PERCENT',
		'SDLK_PERIOD',
		'SDLK_PLUS',
		'SDLK_POWER',
		'SDLK_PRINTSCREEN',
		'SDLK_PRIOR',
		'SDLK_QUESTION',
		'SDLK_QUOTE',
		'SDLK_QUOTEDBL',
		'SDLK_RALT',
		'SDLK_RCTRL',
		'SDLK_RETURN',
		'SDLK_RETURN2',
		'SDLK_RGUI',
		'SDLK_RIGHT',
		'SDLK_RIGHTBRACKET',
		'SDLK_RIGHTPAREN',
		'SDLK_RSHIFT',
		'SDLK_SCROLLLOCK',
		'SDLK_SELECT',
		'SDLK_SEMICOLON',
		'SDLK_SEPARATOR',
		'SDLK_SLASH',
		'SDLK_SLEEP',
		'SDLK_SPACE',
		'SDLK_STOP',
		'SDLK_SYSREQ',
		'SDLK_TAB',
		'SDLK_THOUSANDSSEPARATOR',
		'SDLK_UNDERSCORE',
		'SDLK_UNDO',
		'SDLK_UNKNOWN',
		'SDLK_UP',
		'SDLK_VOLUMEDOWN',
		'SDLK_VOLUMEUP',
		'SDLK_WWW',
		'SDLK_a',
		'SDLK_b',
		'SDLK_c',
		'SDLK_d',
		'SDLK_e',
		'SDLK_f',
		'SDLK_g',
		'SDLK_h',
		'SDLK_i',
		'SDLK_j',
		'SDLK_k',
		'SDLK_l',
		'SDLK_m',
		'SDLK_n',
		'SDLK_o',
		'SDLK_p',
		'SDLK_q',
		'SDLK_r',
		'SDLK_s',
		'SDLK_t',
		'SDLK_u',
		'SDLK_v',
		'SDLK_w',
		'SDLK_x',
		'SDLK_y',
		'SDLK_z',
		'SDL_APP_DIDENTERBACKGROUND',
		'SDL_APP_DIDENTERFOREGROUND',
		'SDL_APP_LOWMEMORY',
		'SDL_APP_TERMINATING',
		'SDL_APP_WILLENTERBACKGROUND',
		'SDL_APP_WILLENTERFOREGROUND',
		'SDL_ARRAYORDER_ABGR',
		'SDL_ARRAYORDER_ARGB',
		'SDL_ARRAYORDER_BGR',
		'SDL_ARRAYORDER_BGRA',
		'SDL_ARRAYORDER_NONE',
		'SDL_ARRAYORDER_RGB',
		'SDL_ARRAYORDER_RGBA',
		'SDL_AUDIO_ALLOW_ANY_CHANGE',
		'SDL_AUDIO_ALLOW_CHANNELS_CHANGE',
		'SDL_AUDIO_ALLOW_FORMAT_CHANGE',
		'SDL_AUDIO_ALLOW_FREQUENCY_CHANGE',
		'SDL_AUDIO_ALLOW_SAMPLES_CHANGE',
		'SDL_AUDIO_MASK_BITSIZE',
		'SDL_BITMAPORDER_1234',
		'SDL_BITMAPORDER_4321',
		'SDL_BITMAPORDER_NONE',
		'SDL_BLENDFACTOR_DST_ALPHA',
		'SDL_BLENDFACTOR_DST_COLOR',
		'SDL_BLENDFACTOR_ONE',
		'SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA',
		'SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR',
		'SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA',
		'SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR',
		'SDL_BLENDFACTOR_SRC_ALPHA',
		'SDL_BLENDFACTOR_SRC_COLOR',
		'SDL_BLENDFACTOR_ZERO',
		'SDL_BLENDMODE_ADD',
		'SDL_BLENDMODE_BLEND',
		'SDL_BLENDMODE_INVALID',
		'SDL_BLENDMODE_MOD',
		'SDL_BLENDMODE_NONE',
		'SDL_BLENDOPERATION_ADD',
		'SDL_BLENDOPERATION_MAXIMUM',
		'SDL_BLENDOPERATION_MINIMUM',
		'SDL_BLENDOPERATION_REV_SUBTRACT',
		'SDL_BLENDOPERATION_SUBTRACT',
		'SDL_BUTTON_LEFT',
		'SDL_BUTTON_LMASK',
		'SDL_BUTTON_MIDDLE',
		'SDL_BUTTON_MMASK',
		'SDL_BUTTON_RIGHT',
		'SDL_BUTTON_RMASK',
		'SDL_BUTTON_X1',
		'SDL_BUTTON_X1MASK',
		'SDL_BUTTON_X2',
		'SDL_BUTTON_X2MASK',
		'SDL_CLIPBOARDUPDATE',
		'SDL_CONTROLLERAXISMOTION',
		'SDL_CONTROLLERBUTTONDOWN',
		'SDL_CONTROLLERBUTTONUP',
		'SDL_CONTROLLERDEVICEADDED',
		'SDL_CONTROLLERDEVICEREMAPPED',
		'SDL_CONTROLLERDEVICEREMOVED',
		'SDL_CONTROLLER_AXIS_INVALID',
		'SDL_CONTROLLER_AXIS_LEFTX',
		'SDL_CONTROLLER_AXIS_LEFTY',
		'SDL_CONTROLLER_AXIS_MAX',
		'SDL_CONTROLLER_AXIS_RIGHTX',
		'SDL_CONTROLLER_AXIS_RIGHTY',
		'SDL_CONTROLLER_AXIS_TRIGGERLEFT',
		'SDL_CONTROLLER_AXIS_TRIGGERRIGHT',
		'SDL_CONTROLLER_BUTTON_A',
		'SDL_CONTROLLER_BUTTON_B',
		'SDL_CONTROLLER_BUTTON_BACK',
		'SDL_CONTROLLER_BUTTON_DPAD_DOWN',
		'SDL_CONTROLLER_BUTTON_DPAD_LEFT',
		'SDL_CONTROLLER_BUTTON_DPAD_RIGHT',
		'SDL_CONTROLLER_BUTTON_DPAD_UP',
		'SDL_CONTROLLER_BUTTON_GUIDE',
		'SDL_CONTROLLER_BUTTON_INVALID',
		'SDL_CONTROLLER_BUTTON_LEFTSHOULDER',
		'SDL_CONTROLLER_BUTTON_LEFTSTICK',
		'SDL_CONTROLLER_BUTTON_MAX',
		'SDL_CONTROLLER_BUTTON_RIGHTSHOULDER',
		'SDL_CONTROLLER_BUTTON_RIGHTSTICK',
		'SDL_CONTROLLER_BUTTON_START',
		'SDL_CONTROLLER_BUTTON_X',
		'SDL_CONTROLLER_BUTTON_Y',
		'SDL_DISABLE',
		'SDL_DOLLARGESTURE',
		'SDL_DOLLARRECORD',
		'SDL_DROPFILE',
		'SDL_ENABLE',
		'SDL_FINGERDOWN',
		'SDL_FINGERMOTION',
		'SDL_FINGERUP',
		'SDL_FIRSTEVENT',
		'SDL_GL_ACCELERATED_VISUAL',
		'SDL_GL_ACCUM_ALPHA_SIZE',
		'SDL_GL_ACCUM_BLUE_SIZE',
		'SDL_GL_ACCUM_GREEN_SIZE',
		'SDL_GL_ACCUM_RED_SIZE',
		'SDL_GL_ALPHA_SIZE',
		'SDL_GL_BLUE_SIZE',
		'SDL_GL_BUFFER_SIZE',
		'SDL_GL_CONTEXT_EGL',
		'SDL_GL_CONTEXT_FLAGS',
		'SDL_GL_CONTEXT_MAJOR_VERSION',
		'SDL_GL_CONTEXT_MINOR_VERSION',
		'SDL_GL_CONTEXT_PROFILE_COMPATIBILITY',
		'SDL_GL_CONTEXT_PROFILE_CORE',
		'SDL_GL_CONTEXT_PROFILE_ES',
		'SDL_GL_CONTEXT_PROFILE_MASK',
		'SDL_GL_DEPTH_SIZE',
		'SDL_GL_DOUBLEBUFFER',
		'SDL_GL_FRAMEBUFFER_SRGB_CAPABLE',
		'SDL_GL_GREEN_SIZE',
		'SDL_GL_MULTISAMPLEBUFFERS',
		'SDL_GL_MULTISAMPLESAMPLES',
		'SDL_GL_RED_SIZE',
		'SDL_GL_RETAINED_BACKING',
		'SDL_GL_SHARE_WITH_CURRENT_CONTEXT',
		'SDL_GL_STENCIL_SIZE',
		'SDL_GL_STEREO',
		'SDL_GL_SWAP_CONTROL',
		'SDL_INIT_AUDIO',
		'SDL_INIT_EVENTS',
		'SDL_INIT_EVERYTHING',
		'SDL_INIT_GAMECONTROLLER',
		'SDL_INIT_HAPTIC',
		'SDL_INIT_JOYSTICK',
		'SDL_INIT_NOPARACHUTE',
		'SDL_INIT_TIMER',
		'SDL_INIT_VIDEO',
		'SDL_JOYAXISMOTION',
		'SDL_JOYBALLMOTION',
		'SDL_JOYBUTTONDOWN',
		'SDL_JOYBUTTONUP',
		'SDL_JOYDEVICEADDED',
		'SDL_JOYDEVICEREMOVED',
		'SDL_JOYHATMOTION',
		'SDL_KEYDOWN',
		'SDL_KEYUP',
		'SDL_LASTEVENT',
		'SDL_MOUSEBUTTONDOWN',
		'SDL_MOUSEBUTTONUP',
		'SDL_MOUSEMOTION',
		'SDL_MOUSEWHEEL',
		'SDL_MULTIGESTURE',
		'SDL_PACKEDLAYOUT_1010102',
		'SDL_PACKEDLAYOUT_1555',
		'SDL_PACKEDLAYOUT_2101010',
		'SDL_PACKEDLAYOUT_332',
		'SDL_PACKEDLAYOUT_4444',
		'SDL_PACKEDLAYOUT_5551',
		'SDL_PACKEDLAYOUT_565',
		'SDL_PACKEDLAYOUT_8888',
		'SDL_PACKEDLAYOUT_NONE',
		'SDL_PACKEDORDER_ABGR',
		'SDL_PACKEDORDER_ARGB',
		'SDL_PACKEDORDER_BGRA',
		'SDL_PACKEDORDER_BGRX',
		'SDL_PACKEDORDER_NONE',
		'SDL_PACKEDORDER_RGBA',
		'SDL_PACKEDORDER_RGBX',
		'SDL_PACKEDORDER_XBGR',
		'SDL_PACKEDORDER_XRGB',
		'SDL_PIXELFORMAT_ARGB8888',
		'SDL_PIXELFORMAT_RGBA8888',
		'SDL_PIXELFORMAT_RGBX8888',
		'SDL_PIXELFORMAT_XRGB8888',
		'SDL_PIXELTYPE_ARRAYF16',
		'SDL_PIXELTYPE_ARRAYF32',
		'SDL_PIXELTYPE_ARRAYU16',
		'SDL_PIXELTYPE_ARRAYU32',
		'SDL_PIXELTYPE_ARRAYU8',
		'SDL_PIXELTYPE_INDEX1',
		'SDL_PIXELTYPE_INDEX4',
		'SDL_PIXELTYPE_INDEX8',
		'SDL_PIXELTYPE_PACKED16',
		'SDL_PIXELTYPE_PACKED32',
		'SDL_PIXELTYPE_PACKED8',
		'SDL_PIXELTYPE_UNKNOWN',
		'SDL_QUIT',
		'SDL_RENDERER_ACCELERATED',
		'SDL_RENDERER_PRESENTVSYNC',
		'SDL_RENDERER_SOFTWARE',
		'SDL_RENDERER_TARGETTEXTURE',
		'SDL_SYSWMEVENT',
		'SDL_SYSWM_ANDROID',
		'SDL_SYSWM_COCOA',
		'SDL_SYSWM_DIRECTFB',
		'SDL_SYSWM_MIR',
		'SDL_SYSWM_UIKIT',
		'SDL_SYSWM_UNKNOWN',
		'SDL_SYSWM_WAYLAND',
		'SDL_SYSWM_WINDOWS',
		'SDL_SYSWM_WINRT',
		'SDL_SYSWM_X11',
		'SDL_TEXTEDITING',
		'SDL_TEXTINPUT',
		'SDL_TEXTUREACCESS_STATIC',
		'SDL_TEXTUREACCESS_STREAMING',
		'SDL_TEXTUREACCESS_TARGET',
		'SDL_USEREVENT',
		'SDL_WINDOWEVENT',
		'SDL_WINDOWEVENT_CLOSE',
		'SDL_WINDOWEVENT_ENTER',
		'SDL_WINDOWEVENT_EXPOSED',
		'SDL_WINDOWEVENT_FOCUS_GAINED',
		'SDL_WINDOWEVENT_FOCUS_LOST',
		'SDL_WINDOWEVENT_HIDDEN',
		'SDL_WINDOWEVENT_LEAVE',
		'SDL_WINDOWEVENT_MAXIMIZED',
		'SDL_WINDOWEVENT_MINIMIZED',
		'SDL_WINDOWEVENT_MOVED',
		'SDL_WINDOWEVENT_NONE',
		'SDL_WINDOWEVENT_RESIZED',
		'SDL_WINDOWEVENT_RESTORED',
		'SDL_WINDOWEVENT_SHOWN',
		'SDL_WINDOWEVENT_SIZE_CHANGED',
		'SDL_WINDOWPOS_CENTERED',
		'SDL_WINDOWPOS_CENTERED_MASK',
		'SDL_WINDOWPOS_UNDEFINED',
		'SDL_WINDOWPOS_UNDEFINED_MASK',
		'SDL_WINDOW_ALLOW_HIGHDPI',
		'SDL_WINDOW_BORDERLESS',
		'SDL_WINDOW_FOREIGN',
		'SDL_WINDOW_FULLSCREEN',
		'SDL_WINDOW_FULLSCREEN_DESKTOP',
		'SDL_WINDOW_HIDDEN',
		'SDL_WINDOW_INPUT_FOCUS',
		'SDL_WINDOW_INPUT_GRABBED',
		'SDL_WINDOW_MAXIMIZED',
		'SDL_WINDOW_MINIMIZED',
		'SDL_WINDOW_MOUSE_FOCUS',
		'SDL_WINDOW_OPENGL',
		'SDL_WINDOW_RESIZABLE',
		'SDL_WINDOW_SHOWN'
	],
	#category : 'OSWindow-SDL2-Bindings',
	#package : 'OSWindow-SDL2',
	#tag : 'Bindings'
}

{ #category : 'class initialization' }
SDL2Constants class >> SDL_BUTTON: button [
	^ (1 << ((button)-1))
]

{ #category : 'class initialization' }
SDL2Constants class >> definePixelFormat_type: type order: order layout: playout bits: bits bytes: bytes [
	^ ((1 << 28) | ((type) << 24) | ((order) << 20) | ((playout) << 16) |
     	    ((bits) << 8) | ((bytes) << 0))
]

{ #category : 'class initialization' }
SDL2Constants class >> initialize [
	"
	self initialize
	"
	self
		initializeAudio;
		initializeCommon;
		initializeEvent;
		initializeGameController;
		initializeKeyboard;
		initializeKeycodes;
		initializeKeycodes2;
		initializeKeycodes3;
		initializeMouse;
		initializeOpenGL;
		initializeOpenGLProfile;
		initializePixelFormat;
		initializeRenderer;
		initializeTexture;
		initializeWindow;
		initializeWM
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeAudio [
	SDL_AUDIO_MASK_BITSIZE := 16rFF.

	AUDIO_U8        := 16r0008.
	AUDIO_S8        := 16r8008.
	AUDIO_U16LSB    := 16r0010.
	AUDIO_S16LSB    := 16r8010.
	AUDIO_U16MSB    := 16r1010.
	AUDIO_S16MSB    := 16r9010.
	AUDIO_U16       := AUDIO_U16LSB.
	AUDIO_S16       := AUDIO_S16LSB.

	AUDIO_S32LSB    := 16r8020.
	AUDIO_S32MSB    := 16r9020.
	AUDIO_S32       := AUDIO_S32LSB.

	AUDIO_F32LSB    := 16r8120.
	AUDIO_F32MSB    := 16r9120.
	AUDIO_F32       := AUDIO_F32LSB.

	"Audio allow change flags."
	SDL_AUDIO_ALLOW_FREQUENCY_CHANGE    := 16r00000001.
	SDL_AUDIO_ALLOW_FORMAT_CHANGE       := 16r00000002.
	SDL_AUDIO_ALLOW_CHANNELS_CHANGE     := 16r00000004.
	SDL_AUDIO_ALLOW_SAMPLES_CHANGE      := 16r00000008.
	SDL_AUDIO_ALLOW_ANY_CHANGE         := (SDL_AUDIO_ALLOW_FREQUENCY_CHANGE|SDL_AUDIO_ALLOW_FORMAT_CHANGE|SDL_AUDIO_ALLOW_CHANNELS_CHANGE|SDL_AUDIO_ALLOW_SAMPLES_CHANGE)
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeCommon [
	SDL_INIT_TIMER := 16r00000001.
	SDL_INIT_AUDIO := 16r00000010.
	SDL_INIT_VIDEO := 16r00000020.
	SDL_INIT_JOYSTICK := 16r00000200.
	SDL_INIT_HAPTIC := 16r00001000.
	SDL_INIT_GAMECONTROLLER := 16r00002000.
	SDL_INIT_EVENTS := 16r00004000.
	SDL_INIT_NOPARACHUTE := 16r00100000.
	SDL_INIT_EVERYTHING := SDL_INIT_TIMER | SDL_INIT_AUDIO | SDL_INIT_VIDEO | SDL_INIT_EVENTS |
                SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC | SDL_INIT_GAMECONTROLLER.
	SDL_DISABLE := 0.
	SDL_ENABLE := 1
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeEvent [
    SDL_FIRSTEVENT := 0.
    SDL_QUIT           := 16r100.

    "iOS Events"
    SDL_APP_TERMINATING	:= SDL_QUIT + 1.
    SDL_APP_LOWMEMORY	:= SDL_QUIT + 2.
    SDL_APP_WILLENTERBACKGROUND	:= SDL_QUIT + 3.
    SDL_APP_DIDENTERBACKGROUND	:= SDL_QUIT + 4.
    SDL_APP_WILLENTERFOREGROUND	:= SDL_QUIT + 5.
    SDL_APP_DIDENTERFOREGROUND	:= SDL_QUIT + 6.

    "Window events"
    SDL_WINDOWEVENT := 16r200.
    SDL_SYSWMEVENT := SDL_WINDOWEVENT + 1.

    "Keyboard events"
    SDL_KEYDOWN  := 16r300.
    SDL_KEYUP			:= SDL_KEYDOWN + 1.
    SDL_TEXTEDITING	:= SDL_KEYDOWN + 2.
    SDL_TEXTINPUT		:= SDL_KEYDOWN + 3.

    "Mouse events"
    SDL_MOUSEMOTION    := 16r400.
    SDL_MOUSEBUTTONDOWN	:= SDL_MOUSEMOTION + 1.
    SDL_MOUSEBUTTONUP		:= SDL_MOUSEMOTION + 2.
    SDL_MOUSEWHEEL			:= SDL_MOUSEMOTION + 3.

    "Joystick events"
    SDL_JOYAXISMOTION  := 16r600.
    SDL_JOYBALLMOTION	:= SDL_JOYAXISMOTION + 1.
    SDL_JOYHATMOTION	:= SDL_JOYAXISMOTION + 2.
    SDL_JOYBUTTONDOWN	:= SDL_JOYAXISMOTION + 3.
    SDL_JOYBUTTONUP		:= SDL_JOYAXISMOTION + 4.
    SDL_JOYDEVICEADDED	:= SDL_JOYAXISMOTION + 5.
    SDL_JOYDEVICEREMOVED	:= SDL_JOYAXISMOTION + 6.

    "Game controller events"
    SDL_CONTROLLERAXISMOTION  := 16r650.
    SDL_CONTROLLERBUTTONDOWN	:= SDL_CONTROLLERAXISMOTION + 1.
    SDL_CONTROLLERBUTTONUP	 	:= SDL_CONTROLLERAXISMOTION + 2.
    SDL_CONTROLLERDEVICEADDED 	:= SDL_CONTROLLERAXISMOTION + 3.
    SDL_CONTROLLERDEVICEREMOVED	:= SDL_CONTROLLERAXISMOTION + 4.
    SDL_CONTROLLERDEVICEREMAPPED	:= SDL_CONTROLLERAXISMOTION + 5.

    "Touch events"
    SDL_FINGERDOWN	:= 16r700.
    SDL_FINGERUP		:= SDL_FINGERDOWN + 1.
    SDL_FINGERMOTION	:= SDL_FINGERDOWN + 2.

    "Gesture events"
    SDL_DOLLARGESTURE  := 16r800.
    SDL_DOLLARRECORD := SDL_DOLLARGESTURE + 1.
    SDL_MULTIGESTURE := SDL_DOLLARGESTURE + 2.

    "Clipboard events"
    SDL_CLIPBOARDUPDATE := 16r900.

    "Drag and drop events"
    SDL_DROPFILE        := 16r1000.

    "/** Events ::SDL_USEREVENT through ::SDL_LASTEVENT are for your use,
     *  and should be allocated with SDL_RegisterEvents()
     */"
    SDL_USEREVENT    := 16r8000.

    "/**
     *  This last event is only for bounding internal arrays
     */"
    SDL_LASTEVENT    := 16rFFFF
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeGameController [
	SDL_CONTROLLER_AXIS_INVALID := -1.
	SDL_CONTROLLER_AXIS_LEFTX := 0.
	SDL_CONTROLLER_AXIS_LEFTY := 1.
	SDL_CONTROLLER_AXIS_RIGHTX := 2.
	SDL_CONTROLLER_AXIS_RIGHTY := 3.
	SDL_CONTROLLER_AXIS_TRIGGERLEFT := 4.
	SDL_CONTROLLER_AXIS_TRIGGERRIGHT := 5.
	SDL_CONTROLLER_AXIS_MAX := 6.

	SDL_CONTROLLER_BUTTON_INVALID := -1.
	SDL_CONTROLLER_BUTTON_A := 0.
	SDL_CONTROLLER_BUTTON_B := 1.
	SDL_CONTROLLER_BUTTON_X := 2.
	SDL_CONTROLLER_BUTTON_Y := 3.
	SDL_CONTROLLER_BUTTON_BACK := 4.
	SDL_CONTROLLER_BUTTON_GUIDE := 5.
	SDL_CONTROLLER_BUTTON_START := 6.
	SDL_CONTROLLER_BUTTON_LEFTSTICK := 7.
	SDL_CONTROLLER_BUTTON_RIGHTSTICK := 8.
	SDL_CONTROLLER_BUTTON_LEFTSHOULDER := 9.
	SDL_CONTROLLER_BUTTON_RIGHTSHOULDER := 10.
	SDL_CONTROLLER_BUTTON_DPAD_UP := 11.
	SDL_CONTROLLER_BUTTON_DPAD_DOWN := 12.
	SDL_CONTROLLER_BUTTON_DPAD_LEFT := 13.
	SDL_CONTROLLER_BUTTON_DPAD_RIGHT := 14.
	SDL_CONTROLLER_BUTTON_MAX := 15
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeKeyboard [
    KMOD_NONE := 16r0000.
    KMOD_LSHIFT := 16r0001.
    KMOD_RSHIFT := 16r0002.
    KMOD_LCTRL := 16r0040.
    KMOD_RCTRL := 16r0080.
    KMOD_LALT := 16r0100.
    KMOD_RALT := 16r0200.
    KMOD_LGUI := 16r0400.
    KMOD_RGUI := 16r0800.
    KMOD_NUM := 16r1000.
    KMOD_CAPS := 16r2000.
    KMOD_MODE := 16r4000.
    KMOD_RESERVED := 16r8000.

	KMOD_CTRL  :=  (KMOD_LCTRL | KMOD_RCTRL).
	KMOD_SHIFT :=  (KMOD_LSHIFT | KMOD_RSHIFT).
	KMOD_ALT    := (KMOD_LALT | KMOD_RALT).
	KMOD_GUI    := (KMOD_LGUI | KMOD_RGUI)
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeKeycodes [
	SDLK_UNKNOWN	:= 16r0000.
	SDLK_RETURN	:= 16r000D.
	SDLK_ESCAPE	:= 16r001B.
	SDLK_BACKSPACE	:= 16r0008.
	SDLK_TAB	:= 16r0009.
	SDLK_SPACE	:= 16r0020.
	SDLK_EXCLAIM	:= 16r0021.
	SDLK_QUOTEDBL	:= 16r0022.
	SDLK_HASH	:= 16r0023.
	SDLK_PERCENT	:= 16r0025.
	SDLK_DOLLAR	:= 16r0024.
	SDLK_AMPERSAND	:= 16r0026.
	SDLK_QUOTE	:= 16r0027.
	SDLK_LEFTPAREN	:= 16r0028.
	SDLK_RIGHTPAREN	:= 16r0029.
	SDLK_ASTERISK	:= 16r002A.
	SDLK_PLUS	:= 16r002B.
	SDLK_COMMA	:= 16r002C.
	SDLK_MINUS	:= 16r002D.
	SDLK_PERIOD	:= 16r002E.
	SDLK_SLASH	:= 16r002F.
	SDLK_0	:= 16r0030.
	SDLK_1	:= 16r0031.
	SDLK_2	:= 16r0032.
	SDLK_3	:= 16r0033.
	SDLK_4	:= 16r0034.
	SDLK_5	:= 16r0035.
	SDLK_6	:= 16r0036.
	SDLK_7	:= 16r0037.
	SDLK_8	:= 16r0038.
	SDLK_9	:= 16r0039.
	SDLK_COLON	:= 16r003A.
	SDLK_SEMICOLON	:= 16r003B.
	SDLK_LESS	:= 16r003C.
	SDLK_EQUALS	:= 16r003D.
	SDLK_GREATER	:= 16r003E.
	SDLK_QUESTION	:= 16r003F.
	SDLK_AT	:= 16r0040.
	SDLK_LEFTBRACKET	:= 16r005B.
	SDLK_BACKSLASH	:= 16r005C.
	SDLK_RIGHTBRACKET	:= 16r005D.
	SDLK_CARET	:= 16r005E.
	SDLK_UNDERSCORE	:= 16r005F.
	SDLK_BACKQUOTE	:= 16r0060.
	SDLK_a	:= 16r0061.
	SDLK_b	:= 16r0062.
	SDLK_c	:= 16r0063.
	SDLK_d	:= 16r0064.
	SDLK_e	:= 16r0065.
	SDLK_f	:= 16r0066.
	SDLK_g	:= 16r0067.
	SDLK_h	:= 16r0068.
	SDLK_i	:= 16r0069.
	SDLK_j	:= 16r006A.
	SDLK_k	:= 16r006B.
	SDLK_l	:= 16r006C.
	SDLK_m	:= 16r006D.
	SDLK_n	:= 16r006E.
	SDLK_o	:= 16r006F.
	SDLK_p	:= 16r0070.
	SDLK_q	:= 16r0071.
	SDLK_r	:= 16r0072.
	SDLK_s	:= 16r0073.
	SDLK_t	:= 16r0074.
	SDLK_u	:= 16r0075.
	SDLK_v	:= 16r0076.
	SDLK_w	:= 16r0077.
	SDLK_x	:= 16r0078.
	SDLK_y	:= 16r0079.
	SDLK_z	:= 16r007A
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeKeycodes2 [
	SDLK_CAPSLOCK	:= 16r40000039.
	SDLK_F1	:= 16r4000003A.
	SDLK_F2	:= 16r4000003B.
	SDLK_F3	:= 16r4000003C.
	SDLK_F4	:= 16r4000003D.
	SDLK_F5	:= 16r4000003E.
	SDLK_F6	:= 16r4000003F.
	SDLK_F7	:= 16r40000040.
	SDLK_F8	:= 16r40000041.
	SDLK_F9	:= 16r40000042.
	SDLK_F10	:= 16r40000043.
	SDLK_F11	:= 16r40000044.
	SDLK_F12	:= 16r40000045.
	SDLK_PRINTSCREEN	:= 16r40000046.
	SDLK_SCROLLLOCK	:= 16r40000047.
	SDLK_PAUSE	:= 16r40000048.
	SDLK_INSERT	:= 16r40000049.
	SDLK_HOME	:= 16r4000004A.
	SDLK_PAGEUP	:= 16r4000004B.
	SDLK_DELETE	:= 16r007F.
	SDLK_END	:= 16r4000004D.
	SDLK_PAGEDOWN	:= 16r4000004E.
	SDLK_RIGHT	:= 16r4000004F.
	SDLK_LEFT	:= 16r40000050.
	SDLK_DOWN	:= 16r40000051.
	SDLK_UP	:= 16r40000052.
	SDLK_NUMLOCKCLEAR	:= 16r40000053.
	SDLK_KP_DIVIDE	:= 16r40000054.
	SDLK_KP_MULTIPLY	:= 16r40000055.
	SDLK_KP_MINUS	:= 16r40000056.
	SDLK_KP_PLUS	:= 16r40000057.
	SDLK_KP_ENTER	:= 16r40000058.
	SDLK_KP_1	:= 16r40000059.
	SDLK_KP_2	:= 16r4000005A.
	SDLK_KP_3	:= 16r4000005B.
	SDLK_KP_4	:= 16r4000005C.
	SDLK_KP_5	:= 16r4000005D.
	SDLK_KP_6	:= 16r4000005E.
	SDLK_KP_7	:= 16r4000005F.
	SDLK_KP_8	:= 16r40000060.
	SDLK_KP_9	:= 16r40000061.
	SDLK_KP_0	:= 16r40000062.
	SDLK_KP_PERIOD	:= 16r40000063.
	SDLK_APPLICATION	:= 16r40000065.
	SDLK_POWER	:= 16r40000066.
	SDLK_KP_EQUALS	:= 16r40000067.
	SDLK_F13	:= 16r40000068.
	SDLK_F14	:= 16r40000069.
	SDLK_F15	:= 16r4000006A.
	SDLK_F16	:= 16r4000006B.
	SDLK_F17	:= 16r4000006C.
	SDLK_F18	:= 16r4000006D.
	SDLK_F19	:= 16r4000006E.
	SDLK_F20	:= 16r4000006F.
	SDLK_F21	:= 16r40000070.
	SDLK_F22	:= 16r40000071.
	SDLK_F23	:= 16r40000072.
	SDLK_F24	:= 16r40000073.
	SDLK_EXECUTE	:= 16r40000074.
	SDLK_HELP	:= 16r40000075.
	SDLK_MENU	:= 16r40000076.
	SDLK_SELECT	:= 16r40000077.
	SDLK_STOP	:= 16r40000078.
	SDLK_AGAIN	:= 16r40000079.
	SDLK_UNDO	:= 16r4000007A.
	SDLK_CUT	:= 16r4000007B.
	SDLK_COPY	:= 16r4000007C.
	SDLK_PASTE	:= 16r4000007D.
	SDLK_FIND	:= 16r4000007E.
	SDLK_MUTE	:= 16r4000007F.
	SDLK_VOLUMEUP	:= 16r40000080.
	SDLK_VOLUMEDOWN	:= 16r40000081.
	SDLK_KP_COMMA	:= 16r40000085.
	SDLK_KP_EQUALSAS400	:= 16r40000086
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeKeycodes3 [
	SDLK_ALTERASE	:= 16r40000099.
	SDLK_SYSREQ	:= 16r4000009A.
	SDLK_CANCEL	:= 16r4000009B.
	SDLK_CLEAR	:= 16r4000009C.
	SDLK_PRIOR	:= 16r4000009D.
	SDLK_RETURN2	:= 16r4000009E.
	SDLK_SEPARATOR	:= 16r4000009F.
	SDLK_OUT	:= 16r400000A0.
	SDLK_OPER	:= 16r400000A1.
	SDLK_CLEARAGAIN	:= 16r400000A2.
	SDLK_CRSEL	:= 16r400000A3.
	SDLK_EXSEL	:= 16r400000A4.
	SDLK_KP_00	:= 16r400000B0.
	SDLK_KP_000	:= 16r400000B1.
	SDLK_THOUSANDSSEPARATOR	:= 16r400000B2.
	SDLK_DECIMALSEPARATOR	:= 16r400000B3.
	SDLK_CURRENCYUNIT	:= 16r400000B4.
	SDLK_CURRENCYSUBUNIT	:= 16r400000B5.
	SDLK_KP_LEFTPAREN	:= 16r400000B6.
	SDLK_KP_RIGHTPAREN	:= 16r400000B7.
	SDLK_KP_LEFTBRACE	:= 16r400000B8.
	SDLK_KP_RIGHTBRACE	:= 16r400000B9.
	SDLK_KP_TAB	:= 16r400000BA.
	SDLK_KP_BACKSPACE	:= 16r400000BB.
	SDLK_KP_A	:= 16r400000BC.
	SDLK_KP_B	:= 16r400000BD.
	SDLK_KP_C	:= 16r400000BE.
	SDLK_KP_D	:= 16r400000BF.
	SDLK_KP_E	:= 16r400000C0.
	SDLK_KP_F	:= 16r400000C1.
	SDLK_KP_XOR	:= 16r400000C2.
	SDLK_KP_POWER	:= 16r400000C3.
	SDLK_KP_PERCENT	:= 16r400000C4.
	SDLK_KP_LESS	:= 16r400000C5.
	SDLK_KP_GREATER	:= 16r400000C6.
	SDLK_KP_AMPERSAND	:= 16r400000C7.
	SDLK_KP_DBLAMPERSAND	:= 16r400000C8.
	SDLK_KP_VERTICALBAR	:= 16r400000C9.
	SDLK_KP_DBLVERTICALBAR	:= 16r400000CA.
	SDLK_KP_COLON	:= 16r400000CB.
	SDLK_KP_HASH	:= 16r400000CC.
	SDLK_KP_SPACE	:= 16r400000CD.
	SDLK_KP_AT	:= 16r400000CE.
	SDLK_KP_EXCLAM	:= 16r400000CF.
	SDLK_KP_MEMSTORE	:= 16r400000D0.
	SDLK_KP_MEMRECALL	:= 16r400000D1.
	SDLK_KP_MEMCLEAR	:= 16r400000D2.
	SDLK_KP_MEMADD	:= 16r400000D3.
	SDLK_KP_MEMSUBTRACT	:= 16r400000D4.
	SDLK_KP_MEMMULTIPLY	:= 16r400000D5.
	SDLK_KP_MEMDIVIDE	:= 16r400000D6.
	SDLK_KP_PLUSMINUS	:= 16r400000D7.
	SDLK_KP_CLEAR	:= 16r400000D8.
	SDLK_KP_CLEARENTRY	:= 16r400000D9.
	SDLK_KP_BINARY	:= 16r400000DA.
	SDLK_KP_OCTAL	:= 16r400000DB.
	SDLK_KP_DECIMAL	:= 16r400000DC.
	SDLK_KP_HEXADECIMAL	:= 16r400000DD.
	SDLK_LCTRL	:= 16r400000E0.
	SDLK_LSHIFT	:= 16r400000E1.
	SDLK_LALT	:= 16r400000E2.
	SDLK_LGUI	:= 16r400000E3.
	SDLK_RCTRL	:= 16r400000E4.
	SDLK_RSHIFT	:= 16r400000E5.
	SDLK_RALT	:= 16r400000E6.
	SDLK_RGUI	:= 16r400000E7.
	SDLK_MODE	:= 16r40000101.
	SDLK_AUDIONEXT	:= 16r40000102.
	SDLK_AUDIOPREV	:= 16r40000103.
	SDLK_AUDIOSTOP	:= 16r40000104.
	SDLK_AUDIOPLAY	:= 16r40000105.
	SDLK_AUDIOMUTE	:= 16r40000106.
	SDLK_MEDIASELECT	:= 16r40000107.
	SDLK_WWW	:= 16r40000108.
	SDLK_MAIL	:= 16r40000109.
	SDLK_CALCULATOR	:= 16r4000010A.
	SDLK_COMPUTER	:= 16r4000010B.
	SDLK_AC_SEARCH	:= 16r4000010C.
	SDLK_AC_HOME	:= 16r4000010D.
	SDLK_AC_BACK	:= 16r4000010E.
	SDLK_AC_FORWARD	:= 16r4000010F.
	SDLK_AC_STOP	:= 16r40000110.
	SDLK_AC_REFRESH	:= 16r40000111.
	SDLK_AC_BOOKMARKS	:= 16r40000112.
	SDLK_BRIGHTNESSDOWN	:= 16r40000113.
	SDLK_BRIGHTNESSUP	:= 16r40000114.
	SDLK_DISPLAYSWITCH	:= 16r40000115.
	SDLK_KBDILLUMTOGGLE	:= 16r40000116.
	SDLK_KBDILLUMDOWN	:= 16r40000117.
	SDLK_KBDILLUMUP	:= 16r40000118.
	SDLK_EJECT	:= 16r40000119.
	SDLK_SLEEP	:= 16r4000011A
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeMouse [
	SDL_BUTTON_LEFT 	:= 1.
	SDL_BUTTON_MIDDLE	:=  2.
	SDL_BUTTON_RIGHT	:= 3.
	SDL_BUTTON_X1		:= 4.
	SDL_BUTTON_X2		:= 5.
	SDL_BUTTON_LMASK	:= self SDL_BUTTON: SDL_BUTTON_LEFT.
	SDL_BUTTON_MMASK	:= self SDL_BUTTON: SDL_BUTTON_MIDDLE.
	SDL_BUTTON_RMASK	:= self SDL_BUTTON: SDL_BUTTON_RIGHT.
	SDL_BUTTON_X1MASK	:= self SDL_BUTTON: SDL_BUTTON_X1.
	SDL_BUTTON_X2MASK  := self SDL_BUTTON: SDL_BUTTON_X2
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeOpenGL [
    SDL_GL_RED_SIZE	:= 0.
    SDL_GL_GREEN_SIZE	:= 1.
    SDL_GL_BLUE_SIZE	:= 2.
    SDL_GL_ALPHA_SIZE	:= 3.
    SDL_GL_BUFFER_SIZE	:= 4.
    SDL_GL_DOUBLEBUFFER	:= 5.
    SDL_GL_DEPTH_SIZE	:= 6.
    SDL_GL_STENCIL_SIZE	:= 7.
    SDL_GL_ACCUM_RED_SIZE	:= 8.
    SDL_GL_ACCUM_GREEN_SIZE	:= 9.
    SDL_GL_ACCUM_BLUE_SIZE		:= 10.
    SDL_GL_ACCUM_ALPHA_SIZE	:= 11.
    SDL_GL_STEREO		:= 12.
    SDL_GL_MULTISAMPLEBUFFERS	:= 13.
    SDL_GL_MULTISAMPLESAMPLES	:= 14.
    SDL_GL_ACCELERATED_VISUAL	:= 15.
    "SDL_GL_SWAP_CONTROL	:= 16" "API desapear"
	 SDL_GL_RETAINED_BACKING := 16.
    SDL_GL_CONTEXT_MAJOR_VERSION := 17.
    SDL_GL_CONTEXT_MINOR_VERSION := 18.
    SDL_GL_CONTEXT_EGL := 19.
    SDL_GL_CONTEXT_FLAGS := 20.
    SDL_GL_CONTEXT_PROFILE_MASK := 21.
    SDL_GL_SHARE_WITH_CURRENT_CONTEXT := 22.
    SDL_GL_FRAMEBUFFER_SRGB_CAPABLE := 23
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeOpenGLProfile [
	 SDL_GL_CONTEXT_PROFILE_CORE           := 1.
    SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  := 2.
    SDL_GL_CONTEXT_PROFILE_ES             := 4
]

{ #category : 'class initialization' }
SDL2Constants class >> initializePixelFormat [
	"
	Pixel format related constants
	"
  	SDL_PIXELTYPE_UNKNOWN := 0.
    	SDL_PIXELTYPE_INDEX1 := 1.
    	SDL_PIXELTYPE_INDEX4 := 2.
    	SDL_PIXELTYPE_INDEX8 := 3.
    	SDL_PIXELTYPE_PACKED8 := 4.
    	SDL_PIXELTYPE_PACKED16 := 5.
    	SDL_PIXELTYPE_PACKED32 := 6.
    	SDL_PIXELTYPE_ARRAYU8 := 7.
    	SDL_PIXELTYPE_ARRAYU16 := 8.
    	SDL_PIXELTYPE_ARRAYU32 := 9.
    	SDL_PIXELTYPE_ARRAYF16 := 10.
    	SDL_PIXELTYPE_ARRAYF32 := 11.

    	SDL_BITMAPORDER_NONE := 0.
    	SDL_BITMAPORDER_4321 := 1.
    	SDL_BITMAPORDER_1234 := 2.

	SDL_PACKEDORDER_NONE := 0.
    	SDL_PACKEDORDER_XRGB := 1.
    	SDL_PACKEDORDER_RGBX := 2.
    	SDL_PACKEDORDER_ARGB := 3.
    	SDL_PACKEDORDER_RGBA := 4.
    	SDL_PACKEDORDER_XBGR := 5.
    	SDL_PACKEDORDER_BGRX := 6.
    	SDL_PACKEDORDER_ABGR := 7.
    	SDL_PACKEDORDER_BGRA := 8.

    	SDL_ARRAYORDER_NONE := 0.
    	SDL_ARRAYORDER_RGB := 1.
    	SDL_ARRAYORDER_RGBA := 2.
    	SDL_ARRAYORDER_ARGB := 3.
    	SDL_ARRAYORDER_BGR := 4.
    	SDL_ARRAYORDER_BGRA := 5.
    	SDL_ARRAYORDER_ABGR := 6.

    	SDL_PACKEDLAYOUT_NONE := 6.
    	SDL_PACKEDLAYOUT_332 := 6.
    	SDL_PACKEDLAYOUT_4444 := 6.
    	SDL_PACKEDLAYOUT_1555 := 6.
    	SDL_PACKEDLAYOUT_5551 := 6.
    	SDL_PACKEDLAYOUT_565 := 6.
    	SDL_PACKEDLAYOUT_8888 := 6.
    	SDL_PACKEDLAYOUT_2101010 := 6.
    	SDL_PACKEDLAYOUT_1010102 := 6.

	SDL_PIXELFORMAT_RGBX8888 := self definePixelFormat_type: SDL_PIXELTYPE_PACKED32 order: SDL_PACKEDORDER_RGBX layout: SDL_PACKEDLAYOUT_8888 bits: 24 bytes: 4.
	SDL_PIXELFORMAT_XRGB8888 := self definePixelFormat_type: SDL_PIXELTYPE_PACKED32 order: SDL_PACKEDORDER_XRGB layout: SDL_PACKEDLAYOUT_8888 bits: 24 bytes: 4.

	SDL_PIXELFORMAT_RGBA8888 := self definePixelFormat_type: SDL_PIXELTYPE_PACKED32 order: SDL_PACKEDORDER_RGBA layout: SDL_PACKEDLAYOUT_8888 bits: 32 bytes: 4.
	SDL_PIXELFORMAT_ARGB8888 := self definePixelFormat_type: SDL_PIXELTYPE_PACKED32 order: SDL_PACKEDORDER_ARGB layout: SDL_PACKEDLAYOUT_8888 bits: 32 bytes: 4
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeRenderer [
	"
	Renderer related constants.
	"
	SDL_RENDERER_SOFTWARE := 16r00000001.
	SDL_RENDERER_ACCELERATED := 16r00000002.
	SDL_RENDERER_PRESENTVSYNC := 16r00000004.
	SDL_RENDERER_TARGETTEXTURE := 16r00000008.

	SDL_BLENDMODE_NONE := 16r00000000.
	SDL_BLENDMODE_BLEND := 16r00000001.
	SDL_BLENDMODE_ADD := 16r00000002.
	SDL_BLENDMODE_MOD := 16r00000004.
	SDL_BLENDMODE_INVALID := 16r7FFFFFFF.

	SDL_BLENDOPERATION_ADD              := 16r1.  "dst + src: supported by all renderers"
	SDL_BLENDOPERATION_SUBTRACT         := 16r2.  "dst - src : supported by D3D9, D3D11, OpenGL, OpenGLES"
	SDL_BLENDOPERATION_REV_SUBTRACT     := 16r3.  "src - dst : supported by D3D9, D3D11, OpenGL, OpenGLES"
	SDL_BLENDOPERATION_MINIMUM          := 16r4.  "min(dst, src) : supported by D3D11"
	SDL_BLENDOPERATION_MAXIMUM          := 16r5.   "max(dst, src) : supported by D3D11"

	SDL_BLENDFACTOR_ZERO                := 16r1. "0. 0. 0. 0"
	SDL_BLENDFACTOR_ONE                 := 16r2. "1. 1. 1. 1"
	SDL_BLENDFACTOR_SRC_COLOR           := 16r3. "srcR. srcG. srcB. srcA"
	SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR := 16r4. "1-srcR. 1-srcG. 1-srcB. 1-srcA"
	SDL_BLENDFACTOR_SRC_ALPHA           := 16r5. "srcA. srcA. srcA. srcA"
	SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA := 16r6. "1-srcA. 1-srcA. 1-srcA. 1-srcA"
	SDL_BLENDFACTOR_DST_COLOR           := 16r7. "dstR. dstG. dstB. dstA"
	SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR := 16r8. "1-dstR. 1-dstG. 1-dstB. 1-dstA"
	SDL_BLENDFACTOR_DST_ALPHA           := 16r9. "dstA. dstA. dstA. dstA"
	SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA := 16rA. "1-dstA. 1-dstA. 1-dstA. 1-dstA"
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeTexture [
	"
	Texture related constants.
	"
      SDL_TEXTUREACCESS_STATIC := 0.
      SDL_TEXTUREACCESS_STREAMING := 1.
      SDL_TEXTUREACCESS_TARGET := 2
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeWM [
	"
	Window Manager related constants.
	"

	SDL_SYSWM_UNKNOWN := 0.
	SDL_SYSWM_WINDOWS := 1.
	SDL_SYSWM_X11 := 2.
	SDL_SYSWM_DIRECTFB := 3.
	SDL_SYSWM_COCOA := 4.
	SDL_SYSWM_UIKIT := 5.
	SDL_SYSWM_WAYLAND := 6.
	SDL_SYSWM_MIR := 7.
	SDL_SYSWM_WINRT := 8.
	SDL_SYSWM_ANDROID := 9
]

{ #category : 'class initialization' }
SDL2Constants class >> initializeWindow [
	"
	Window related constants.
	"
    SDL_WINDOW_FULLSCREEN := 16r00000001.
    SDL_WINDOW_OPENGL := 16r00000002.
    SDL_WINDOW_SHOWN := 16r00000004.
    SDL_WINDOW_HIDDEN := 16r00000008.
    SDL_WINDOW_BORDERLESS := 16r00000010.
    SDL_WINDOW_RESIZABLE := 16r00000020.
    SDL_WINDOW_MINIMIZED := 16r00000040.
    SDL_WINDOW_MAXIMIZED := 16r00000080.
    SDL_WINDOW_INPUT_GRABBED := 16r00000100.
    SDL_WINDOW_INPUT_FOCUS := 16r00000200.
    SDL_WINDOW_MOUSE_FOCUS := 16r00000400.
    SDL_WINDOW_FULLSCREEN_DESKTOP := ( SDL_WINDOW_FULLSCREEN | 16r00001000 ).
    SDL_WINDOW_FOREIGN := 16r00000800.
    SDL_WINDOW_ALLOW_HIGHDPI := 16r00002000.

    SDL_WINDOWPOS_UNDEFINED_MASK := 16r1FFF0000.
    SDL_WINDOWPOS_UNDEFINED := SDL_WINDOWPOS_UNDEFINED_MASK.

    SDL_WINDOWPOS_CENTERED_MASK := 16r2FFF0000.
    SDL_WINDOWPOS_CENTERED := SDL_WINDOWPOS_CENTERED_MASK.

    SDL_WINDOWEVENT_NONE			:= 0.
    SDL_WINDOWEVENT_SHOWN		:= 1.
    SDL_WINDOWEVENT_HIDDEN			:= 2.
    SDL_WINDOWEVENT_EXPOSED		:= 3.
    SDL_WINDOWEVENT_MOVED			:= 4.
    SDL_WINDOWEVENT_RESIZED		:= 5.
    SDL_WINDOWEVENT_SIZE_CHANGED		:= 6.
    SDL_WINDOWEVENT_MINIMIZED		:= 7.
    SDL_WINDOWEVENT_MAXIMIZED		:= 8.
    SDL_WINDOWEVENT_RESTORED		:= 9.
    SDL_WINDOWEVENT_ENTER			:= 10.
    SDL_WINDOWEVENT_LEAVE			:= 11.
    SDL_WINDOWEVENT_FOCUS_GAINED		:= 12.
    SDL_WINDOWEVENT_FOCUS_LOST		:= 13.
    SDL_WINDOWEVENT_CLOSE			:= 14
]

{ #category : 'initialization' }
SDL2Constants >> initialize [
		<ignoreUnusedClassVariables: #( SDL_GL_SWAP_CONTROL )>
		super initialize.
]
